<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>uCXpresso.BLE: thread.h Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../upnp.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">uCXpresso.BLE
   &#160;<span id="projectnumber">v1.0.4</span>
   </div>
   <div id="projectbrief">RTOS C++ Framework for Bluetooth Low Energy</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="../../modules.html"><span>Modules</span></a></li>
      <li><a href="../../annotated.html"><span>Classes</span></a></li>
      <li><a href="../../examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('db/dd5/thread_8h_source.html','../../');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">thread.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> Name        : thread.h</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> Author      : uCXpresso</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> Version     : 1.0.7</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> Date        : 2014/1/5</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> Copyright   : Copyright (C) www.embeda.com.tw</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> Description :</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> ===============================================================================</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">                                 History</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> DATE     | VERSION |   DESCRIPTIONS                             |  By</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> ---------+---------+--------------------------------------------+-------------</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> 2011/12/18 v1.0.0  First Edition                                    Jason</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> 2012/04/28 v1.0.1  Remove autoDestory                               Jason</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> 2012/05/26 v1.0.2  add static member fuction. suspendAll,resumeAll  Jason</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> 2012/10/06 v1.0.3  Set virtual inheritance from CObject             Jason</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> 2012/12/28 v1.0.4  add task status. (add for freeRTOS v7.3.0)       Jason</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> 2013/05/31 v1.0.5  add isAlive() and kill() member functions        Jason</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> 2013/07/05 v1.0.6  override the isThread() from CObject             Jason</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> 2014/1/5   v1.0.7  reduce PRI_HARDWARE value to 4                   Jason</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">  ===============================================================================</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef THREAD_H_</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define THREAD_H_</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;class/object.h&quot;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">   37</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1daf8a2513dc9a78bb09c0520af65a3f402">   38</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1daf8a2513dc9a78bb09c0520af65a3f402">PRI_LOW</a> = 0,    </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da79f9a58f2b2fb4dcce4589cd93a5e3f8">   39</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da79f9a58f2b2fb4dcce4589cd93a5e3f8">PRI_MEDIUM</a>,     </div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae366c91784dd520e388c90d0e3770b2b">   40</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae366c91784dd520e388c90d0e3770b2b">PRI_HIGH</a>,       </div>
<div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae497885a7abaca97e8daf75b84bb67da">   41</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae497885a7abaca97e8daf75b84bb67da">PRI_SUPER</a>,      </div>
<div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da47d8cd9e6c142378614cf48f5ecd78e5">   42</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da47d8cd9e6c142378614cf48f5ecd78e5">PRI_HARDWARE</a>    </div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">PRIORITIES_T</a>;</div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#ga25ee4013cc565a18ac2f4039b4ad441b">   48</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1061be6c3fb88d32829cba6f6b2be304">   50</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1061be6c3fb88d32829cba6f6b2be304">RUNNING</a> = 0,    </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba6564f2f3e15be06b670547bbcaaf0798">   51</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba6564f2f3e15be06b670547bbcaaf0798">READY</a>,          </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba376c1b6a3f75d283a2efacf737438d61">   52</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba376c1b6a3f75d283a2efacf737438d61">BLOCKED</a>,        </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1c2114335a42993ac5cc5dbf65f83d41">   53</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1c2114335a42993ac5cc5dbf65f83d41">SUSPENDED</a>,      </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441baae88752b9379248f07e2c3fdc064d998">   54</a></span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441baae88752b9379248f07e2c3fdc064d998">DELETED</a>         </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;}<a class="code" href="../../db/dff/group___enumerations.html#ga25ee4013cc565a18ac2f4039b4ad441b">TASK_STATE_T</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#define DEF_THREAD_STACK    72</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="../../d0/d26/class_c_thread.html">   64</a></span>&#160;<span class="keyword">class </span><a class="code" href="../../d0/d26/class_c_thread.html">CThread</a>: <span class="keyword">virtual</span> <span class="keyword">public</span> <a class="code" href="../../dc/dac/class_c_object.html">CObject</a> {</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d26/class_c_thread.html#aacf955d1852e74da1f989251955ee6ec">start</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keywordtype">int</span> stack=DEF_THREAD_STACK, <a class="code" href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">PRIORITIES_T</a> priority=<a class="code" href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1daf8a2513dc9a78bb09c0520af65a3f402">PRI_LOW</a>);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d26/class_c_thread.html#aacf955d1852e74da1f989251955ee6ec">start</a>();</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#ac8c53aa8c145fc4ac70fa6d825b95742">resume</a>();</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a53e71e6db2221cd1c45aec21953d4aad">suspend</a>();</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    uint32_t <a class="code" href="../../d0/d26/class_c_thread.html#ac0227eda51725b795a461a768703f588">getStackHighWaterMark</a>();</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d26/class_c_thread.html#a51dbe9909ce528b4113d2cc27314e965">isSuspend</a>();</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    <a class="code" href="../../db/dff/group___enumerations.html#ga25ee4013cc565a18ac2f4039b4ad441b">TASK_STATE_T</a> <a class="code" href="../../d0/d26/class_c_thread.html#a1e9cce461d8dfb3889cea24f1a703f6f">getState</a>();</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a6b0703ae0cc085a0c0aaa55b6945575b">setPriority</a>(<a class="code" href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">PRIORITIES_T</a> p);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keyword">virtual</span> <a class="code" href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">PRIORITIES_T</a>  <a class="code" href="../../d0/d26/class_c_thread.html#ac30b0a1f51549a97b88771692319c0e4">getPriority</a>();</div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    LPCTSTR <a class="code" href="../../d0/d26/class_c_thread.html#aa291909bc3ff7cc0decf46c885a7a725">getName</a>();</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d26/class_c_thread.html#a4a0f0727be4714cef1e24150a869d403">isAlive</a>();</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a15041136818470124d097d790d55a6e5">kill</a>();</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;</div>
<div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">  178</a></span>&#160;    <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">isThread</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    <span class="comment">// global static functions</span></div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a743d4325b7e7da494283f3292773ff77">resumeAll</a>();</div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a2c09328581bd4e4a3e9e793f3376a92a">suspendAll</a>();</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#aeb4cafe42d6cfc41294cf5dedcee8678">enterCriticalSection</a>();</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#aab3a51062666552690be49b8e8027161">exitCriticalSection</a>();</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="../../d0/d26/class_c_thread.html#a071c3d3b3c19a7bd6a01aca073a9b4d7">run</a>()=PURE_VIRTUAL_FUNC;</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;    <a class="code" href="../../d0/d26/class_c_thread.html">CThread</a>();</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    ~<a class="code" href="../../d0/d26/class_c_thread.html">CThread</a>();</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    uint32_t    m_flag;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    xHandle     m_xHandle;</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> xTaskRun(<a class="code" href="../../d0/d26/class_c_thread.html">CThread</a> *pthread);</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">void</span> destroy(xHandle task);</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;};</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* THREAD_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="group___enumerations_html_gga51e24e4c0498282f564e92975e020c1daf8a2513dc9a78bb09c0520af65a3f402"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1daf8a2513dc9a78bb09c0520af65a3f402">PRI_LOW</a></div><div class="ttdoc">low priorities is for all normal tasks used. </div><div class="ttdef"><b>Definition:</b> thread.h:38</div></div>
<div class="ttc" id="class_c_thread_html_aacf955d1852e74da1f989251955ee6ec"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#aacf955d1852e74da1f989251955ee6ec">CThread::start</a></div><div class="ttdeci">virtual bool start()</div></div>
<div class="ttc" id="class_c_thread_html_ac0227eda51725b795a461a768703f588"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#ac0227eda51725b795a461a768703f588">CThread::getStackHighWaterMark</a></div><div class="ttdeci">uint32_t getStackHighWaterMark()</div></div>
<div class="ttc" id="class_c_thread_html_a4a0f0727be4714cef1e24150a869d403"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a4a0f0727be4714cef1e24150a869d403">CThread::isAlive</a></div><div class="ttdeci">virtual bool isAlive()</div></div>
<div class="ttc" id="class_c_thread_html_a51dbe9909ce528b4113d2cc27314e965"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a51dbe9909ce528b4113d2cc27314e965">CThread::isSuspend</a></div><div class="ttdeci">virtual bool isSuspend()</div></div>
<div class="ttc" id="class_c_thread_html_aeb4cafe42d6cfc41294cf5dedcee8678"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#aeb4cafe42d6cfc41294cf5dedcee8678">CThread::enterCriticalSection</a></div><div class="ttdeci">static void enterCriticalSection()</div></div>
<div class="ttc" id="group___enumerations_html_gga51e24e4c0498282f564e92975e020c1da79f9a58f2b2fb4dcce4589cd93a5e3f8"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da79f9a58f2b2fb4dcce4589cd93a5e3f8">PRI_MEDIUM</a></div><div class="ttdoc">medium </div><div class="ttdef"><b>Definition:</b> thread.h:39</div></div>
<div class="ttc" id="group___enumerations_html_gga25ee4013cc565a18ac2f4039b4ad441ba376c1b6a3f75d283a2efacf737438d61"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba376c1b6a3f75d283a2efacf737438d61">BLOCKED</a></div><div class="ttdoc">The task being queried is in the Blocked state. </div><div class="ttdef"><b>Definition:</b> thread.h:52</div></div>
<div class="ttc" id="class_c_thread_html"><div class="ttname"><a href="../../d0/d26/class_c_thread.html">CThread</a></div><div class="ttdef"><b>Definition:</b> thread.h:64</div></div>
<div class="ttc" id="class_c_thread_html_a15041136818470124d097d790d55a6e5"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a15041136818470124d097d790d55a6e5">CThread::kill</a></div><div class="ttdeci">virtual void kill()</div></div>
<div class="ttc" id="class_c_thread_html_a743d4325b7e7da494283f3292773ff77"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a743d4325b7e7da494283f3292773ff77">CThread::resumeAll</a></div><div class="ttdeci">static void resumeAll()</div></div>
<div class="ttc" id="group___enumerations_html_gga51e24e4c0498282f564e92975e020c1dae366c91784dd520e388c90d0e3770b2b"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae366c91784dd520e388c90d0e3770b2b">PRI_HIGH</a></div><div class="ttdoc">high </div><div class="ttdef"><b>Definition:</b> thread.h:40</div></div>
<div class="ttc" id="group___enumerations_html_gga25ee4013cc565a18ac2f4039b4ad441ba6564f2f3e15be06b670547bbcaaf0798"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba6564f2f3e15be06b670547bbcaaf0798">READY</a></div><div class="ttdoc">The task being queried is in a read or pending ready list. </div><div class="ttdef"><b>Definition:</b> thread.h:51</div></div>
<div class="ttc" id="class_c_thread_html_a071c3d3b3c19a7bd6a01aca073a9b4d7"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a071c3d3b3c19a7bd6a01aca073a9b4d7">CThread::run</a></div><div class="ttdeci">virtual void run()</div></div>
<div class="ttc" id="class_c_thread_html_a53e71e6db2221cd1c45aec21953d4aad"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a53e71e6db2221cd1c45aec21953d4aad">CThread::suspend</a></div><div class="ttdeci">virtual void suspend()</div></div>
<div class="ttc" id="group___enumerations_html_gga51e24e4c0498282f564e92975e020c1dae497885a7abaca97e8daf75b84bb67da"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1dae497885a7abaca97e8daf75b84bb67da">PRI_SUPER</a></div><div class="ttdoc">super </div><div class="ttdef"><b>Definition:</b> thread.h:41</div></div>
<div class="ttc" id="class_c_thread_html_aa291909bc3ff7cc0decf46c885a7a725"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#aa291909bc3ff7cc0decf46c885a7a725">CThread::getName</a></div><div class="ttdeci">LPCTSTR getName()</div></div>
<div class="ttc" id="class_c_thread_html_a6b0703ae0cc085a0c0aaa55b6945575b"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a6b0703ae0cc085a0c0aaa55b6945575b">CThread::setPriority</a></div><div class="ttdeci">virtual void setPriority(PRIORITIES_T p)</div></div>
<div class="ttc" id="class_c_thread_html_ac30b0a1f51549a97b88771692319c0e4"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#ac30b0a1f51549a97b88771692319c0e4">CThread::getPriority</a></div><div class="ttdeci">virtual PRIORITIES_T getPriority()</div></div>
<div class="ttc" id="group___enumerations_html_gga25ee4013cc565a18ac2f4039b4ad441baae88752b9379248f07e2c3fdc064d998"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441baae88752b9379248f07e2c3fdc064d998">DELETED</a></div><div class="ttdoc">The task being queried has been deleted, but its TCB has not yet been freed. </div><div class="ttdef"><b>Definition:</b> thread.h:54</div></div>
<div class="ttc" id="class_c_thread_html_a2c09328581bd4e4a3e9e793f3376a92a"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a2c09328581bd4e4a3e9e793f3376a92a">CThread::suspendAll</a></div><div class="ttdeci">static void suspendAll()</div></div>
<div class="ttc" id="class_c_thread_html_ab2513fd0fcad30e2e6605609c91f1984"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#ab2513fd0fcad30e2e6605609c91f1984">CThread::isThread</a></div><div class="ttdeci">virtual bool isThread()</div><div class="ttdef"><b>Definition:</b> thread.h:178</div></div>
<div class="ttc" id="class_c_thread_html_ac8c53aa8c145fc4ac70fa6d825b95742"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#ac8c53aa8c145fc4ac70fa6d825b95742">CThread::resume</a></div><div class="ttdeci">virtual void resume()</div></div>
<div class="ttc" id="group___enumerations_html_gga25ee4013cc565a18ac2f4039b4ad441ba1061be6c3fb88d32829cba6f6b2be304"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1061be6c3fb88d32829cba6f6b2be304">RUNNING</a></div><div class="ttdoc">A task is querying the state of itself, so must be running. </div><div class="ttdef"><b>Definition:</b> thread.h:50</div></div>
<div class="ttc" id="class_c_object_html"><div class="ttname"><a href="../../dc/dac/class_c_object.html">CObject</a></div><div class="ttdef"><b>Definition:</b> object.h:36</div></div>
<div class="ttc" id="class_c_thread_html_aab3a51062666552690be49b8e8027161"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#aab3a51062666552690be49b8e8027161">CThread::exitCriticalSection</a></div><div class="ttdeci">static void exitCriticalSection()</div></div>
<div class="ttc" id="group___enumerations_html_gga51e24e4c0498282f564e92975e020c1da47d8cd9e6c142378614cf48f5ecd78e5"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga51e24e4c0498282f564e92975e020c1da47d8cd9e6c142378614cf48f5ecd78e5">PRI_HARDWARE</a></div><div class="ttdoc">for hardware interrupt </div><div class="ttdef"><b>Definition:</b> thread.h:42</div></div>
<div class="ttc" id="group___enumerations_html_ga51e24e4c0498282f564e92975e020c1d"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga51e24e4c0498282f564e92975e020c1d">PRIORITIES_T</a></div><div class="ttdeci">PRIORITIES_T</div><div class="ttdef"><b>Definition:</b> thread.h:37</div></div>
<div class="ttc" id="group___enumerations_html_ga25ee4013cc565a18ac2f4039b4ad441b"><div class="ttname"><a href="../../db/dff/group___enumerations.html#ga25ee4013cc565a18ac2f4039b4ad441b">TASK_STATE_T</a></div><div class="ttdeci">TASK_STATE_T</div><div class="ttdef"><b>Definition:</b> thread.h:48</div></div>
<div class="ttc" id="class_c_thread_html_a1e9cce461d8dfb3889cea24f1a703f6f"><div class="ttname"><a href="../../d0/d26/class_c_thread.html#a1e9cce461d8dfb3889cea24f1a703f6f">CThread::getState</a></div><div class="ttdeci">TASK_STATE_T getState()</div></div>
<div class="ttc" id="group___enumerations_html_gga25ee4013cc565a18ac2f4039b4ad441ba1c2114335a42993ac5cc5dbf65f83d41"><div class="ttname"><a href="../../db/dff/group___enumerations.html#gga25ee4013cc565a18ac2f4039b4ad441ba1c2114335a42993ac5cc5dbf65f83d41">SUSPENDED</a></div><div class="ttdoc">The task being queried is in the Suspended state, or is in the Blocked state with an infinite time ou...</div><div class="ttdef"><b>Definition:</b> thread.h:53</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="../../dir_d9ab3e09413249e340719d1c246acc66.html">Jason Project</a></li><li class="navelem"><a class="el" href="../../dir_e60b0d0338763df7a227cbecf5ac6106.html">Firmware</a></li><li class="navelem"><a class="el" href="../../dir_c8ef7bdfc8622ceb56fdbfff8f44a6b4.html">lpcxpresso</a></li><li class="navelem"><a class="el" href="../../dir_bc2544560b94a5512f672a61310393b1.html">ucxpresso.lite</a></li><li class="navelem"><a class="el" href="../../dir_89b485e3174b4ad30c1cd4b50a79dec9.html">uCXpresso.BLE</a></li><li class="navelem"><a class="el" href="../../dir_ef35519cefd621f663612ebad34cbfc9.html">inc</a></li><li class="navelem"><a class="el" href="../../dir_23b8956a4518e3beec6402c1bb795b19.html">class</a></li><li class="navelem"><b>thread.h</b></li>
    <li class="footer">Generated on Fri Apr 11 2014 23:43:26 for uCXpresso.BLE by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
